package com.wzy.service.impl;


import com.wzy.dao.ExternalPopulationDao;
import com.wzy.pojo.ExternalPopulation;
import com.wzy.pojo.ExternalPopulationInfo;
import com.wzy.service.ExternalPopulationService;
import com.wzy.utils.Utils;
import org.apache.ibatis.session.SqlSession;
import org.springframework.stereotype.Service;

import java.util.List;
@Service("externalPopulationService")
public class ExternalPopulationServiceImpl implements ExternalPopulationService {
    SqlSession sqlSession = Utils.getSqlSession();
    ExternalPopulationDao externalPopulationDao =sqlSession.getMapper(ExternalPopulationDao.class);
    @Override
    public ExternalPopulation findExternalPopulation(String ID_number) {
         ExternalPopulation externalPopulation =externalPopulationDao.findExternalPopulation(ID_number);
        return externalPopulation;
    }

    @Override
    public List<ExternalPopulationInfo> findAllExternalPopulationInfo() {
        return externalPopulationDao.findAllExternalPopulationInfo();
    }

    @Override
    public void addExternalPopulation(ExternalPopulation e) {

        externalPopulationDao.addExternalPopulation(e);
    }

    @Override
    public void deleteExternalPopulation(String ID) {
        externalPopulationDao.deleteExternalPopulation(ID);

    }

    @Override
    public void updateExternalPopulation(ExternalPopulation e) {
        externalPopulationDao.updateExternalPopulation(e);

    }
}
